import array
D_INPUT = True
if D_INPUT:
    s = raw_input()
else:
    s = "-12,4,-345345345,12345"
    
s = map(int, s.split(","))
s = array.array('i',s).tostring()
s = array.array('c',s)
s.reverse()
s = s.tostring()
s = array.array('i',s).tolist()

print s

